package control.bd.table;

public class User {

	public String login;
		public String password;
		public String email;
		public String nom;
		public String prenom;
		public String adresse;
		public String tel;
	
		public User() {

			login = null;
			password = null;
			email = null;
			nom = null;
			prenom = null;
			adresse = null;
			tel = null;
	
		}

		public String getLogin() {
			return login;
		}
	
		public void setLogin(String login) {
			this.login = login;
		}
	
		public String getNom() {
			return nom;
		}

		public void setNom(String nom) {
			this.nom = nom;
		}

		public String getPrenom() {
			return prenom;
		}

		public void setPrenom(String prenom) {
			this.prenom = prenom;
		}

		public String getAdresse() {
			return adresse;
		}

		public void setAdresse(String adresse) {
			this.adresse = adresse;
		}

		public String getTel() {
			return tel;
		}

		public void setTel(String tel) {
			this.tel = tel;
		}

		public String getEmail() {
			return email;
		}
	
		public void setEmail(String email) {
			this.email = email;
		}
	
		public String getPassword() {
			return password;
		}
	
		public void setPassword(String password) {
			this.password = password;
		}
		
		//Retourne vrai si tout les champs sont renseignes
	
		public boolean valide() {
			boolean valide = false;
	
			valide = valide && !login.isEmpty();
			valide = valide && !password.isEmpty();
			valide = valide && !email.isEmpty();
			valide = valide && !nom.isEmpty();
			valide = valide && !prenom.isEmpty();
			valide = valide && !adresse.isEmpty();
			valide = valide && !tel.isEmpty();
	
			return valide;
		}
	
	
		public String toString() {
			return "User [dateInscription=" +  ", idUser=" + ", login=" + login + ", mail=" +  ", password=" + password + ",  email=" + email + ", adresse=" + adresse + ", tel=" + tel +  "]";
	
		}
}
